'use strict';

module.exports = app => {
  const { STRING, INTEGER, DATE, BOOLEAN } = app.Sequelize;

  const Router = app.model.define('router', {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true },
    title: STRING(30),
    description: STRING(200),
    path: STRING(200),
    action_name: STRING(30),
    controller_name: STRING(200),
    middleware_name: STRING(200),
    status: BOOLEAN,
    created_at: DATE,
    updated_at: DATE,
  });

  return Router;
};